Optimal. Leaf size=127 \[ -\frac {a (4-n) (a \sec (c+d x)+a)^{n-1} \, _2F_1\left (1,n-1;n;\frac {1}{2} (\sec (c+d x)+1)\right )}{4 d (1-n)}+\frac {a (a \sec (c+d x)+a)^{n-1} \, _2F_1(1,n-1;n;\sec (c+d x)+1)}{d (1-n)}+\frac {a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3880, 103, 156, 65, 68} \[ -\frac {a (4-n) (a \sec (c+d x)+a)^{n-1} \, _2F_1\left (1,n-1;n;\frac {1}{2} (\sec (c+d x)+1)\right )}{4 d (1-n)}+\frac {a (a \sec (c+d x)+a)^{n-1} \, _2F_1(1,n-1;n;\sec (c+d x)+1)}{d (1-n)}+\frac {a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 68
Rule 103
Rule 156
Rule 3880
Rubi steps
\begin {align*} \int \cot ^3(c+d x) (a+a \sec (c+d x))^n \, dx &=\frac {a^4 \operatorname {Subst}\left (\int \frac {(a+a x)^{-2+n}}{x (-a+a x)^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac {a \operatorname {Subst}\left (\int \frac {(a+a x)^{-2+n} \left (2 a^2+a^2 (2-n) x\right )}{x (-a+a x)} \, dx,x,\sec (c+d x)\right )}{2 d}\\ &=\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}+\frac {a^2 \operatorname {Subst}\left (\int \frac {(a+a x)^{-2+n}}{x} \, dx,x,\sec (c+d x)\right )}{d}-\frac {\left (a^3 (4-n)\right ) \operatorname {Subst}\left (\int \frac {(a+a x)^{-2+n}}{-a+a x} \, dx,x,\sec (c+d x)\right )}{2 d}\\ &=-\frac {a (4-n) \, _2F_1\left (1,-1+n;n;\frac {1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac {a \, _2F_1(1,-1+n;n;1+\sec (c+d x)) (a+a \sec (c+d x))^{-1+n}}{d (1-n)}+\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 96, normalized size = 0.76 \[ -\frac {a (a (\sec (c+d x)+1))^{n-1} \left ((n-4) (\sec (c+d x)-1) \, _2F_1\left (1,n-1;n;\frac {1}{2} (\sec (c+d x)+1)\right )+4 (\sec (c+d x)-1) \, _2F_1(1,n-1;n;\sec (c+d x)+1)+2 n-2\right )}{4 d (n-1) (\sec (c+d x)-1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.06, size = 0, normalized size = 0.00 \[ \int \left (\cot ^{3}\left (d x +c \right )\right ) \left (a +a \sec \left (d x +c \right )\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {cot}\left (c+d\,x\right )}^3\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \cot ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________